<html>
  <head>
    <title>A canvas strokeStyle example</title>
    <meta name="DC.creator" content="Kamiel Martinet, http://www.martinet.nl/">
    <meta name="DC.publisher" content="Mozilla Developer Center, http://developer.mozilla.org">

	<!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->

    <script>
    function boot() {
      draw(document.getElementById('canvas').getContext('2d'));
      draw(document.getElementById('vmlcanvas').getContext('2d'));
    }
    function draw(ctx) {
      for (i=0;i<6;i++){
        for (j=0;j<6;j++){
          ctx.strokeStyle = 'rgb(0,' + Math.floor(255-42.5*i) + ',' + 
                           Math.floor(255-42.5*j) + ')';
          ctx.beginPath();
          ctx.arc(12.5+j*25,12.5+i*25,10,0,Math.PI*2,true);
          ctx.stroke();
        }
      }
    }
    </script>
    <style type="text/css">
      body { margin: 20px; font-family: arial,verdana,helvetica; background: #fff;}
      h1 { font-size: 140%; font-weight:normal; color: #036; border-bottom: 1px solid #ccc; }
      canvas { float: left; margin-right: 20px; margin-bottom: 20px; }
      pre { float:left; display:block; background: rgb(238,238,238); border: 1px dashed #666; padding: 15px 20px; margin: 0 0 10px 0; }
    </style>
  </head>
  <body onload="boot();">
    <h1>A canvas <code>strokeStyle</code> example</h1>
    <div>
      <canvas id="canvas" width="150" height="150"></canvas>
      <canvas id="vmlcanvas" class="vml" width="150" height="150"></canvas>
      <pre>
    function boot() {
      draw(document.getElementById('canvas').getContext('2d'));
      draw(document.getElementById('vmlcanvas').getContext('2d'));
    }
    function draw(ctx) {
      for (i=0;i<6;i++){
        for (j=0;j<6;j++){
          ctx.strokeStyle = 'rgb(0,' + Math.floor(255-42.5*i) + ',' + 
                           Math.floor(255-42.5*j) + ')';
          ctx.beginPath();
          ctx.arc(12.5+j*25,12.5+i*25,10,0,Math.PI*2,true);
          ctx.stroke();
        }
      }
    }
      </pre>
    </div>
  </body>
</html>
